// pages/goods_list/goods_list.js
var app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    goods_list:[
        {
            name:'测测试商品名字测试商品名字测试商品名字测试商品名字试商品名字1',
            price:998.00,
            pic:'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
        {
            name: '测试商品名字1',
            price: 998.00,
            pic: 'http://img95.699pic.com/photo/50046/6581.jpg_wh300.jpg'
        },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
      app.getUrl(options);
  },
  /**
   * 调用全局返回函数 
   */
  returnPage: function (e) {
      app.returnPage(e);
  },
  /**
   * 综合排序菜单
   */
  toSort:function(e){
      wx.showActionSheet({
          itemList: ['价格由高到低', '价格由低到高', '上架时间'],
          success: function (res) {
              console.log(res.tapIndex)
          },
          fail: function (res) {
              console.log(res.errMsg)
          }
      })
  }
})